package com.debao;

import com.debao.common.core.domain.AjaxResult;
import com.debao.system.domain.VipCard;
import com.debao.system.service.IVipCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/api/vipCard")
@RestController
@CrossOrigin
public class ApiVipCard {

    @Autowired
    private IVipCardService vipCardService;

    /**
     * 获取会员卡列表
     * @param vipCard
     * @return
     */
    @GetMapping("/list")
    public AjaxResult list(VipCard vipCard){
        List<VipCard> vipCards = vipCardService.selectVipCardList(vipCard);
        return AjaxResult.success(vipCards);
    }

}
